class Player:
    def __init__(self):
       
        self.food = 0
        self.reputation = 0
        self.prevRankingValue = 0
        

    def hunt_choices(self, round_number, current_food, current_reputation, m, player_reputations):
        #sorting players base on reputations while preserving
        #information about their original index 
        playerList=[]
        for i in range(len(player_reputations)):
            playerList.append((player_reputations[i],i)) #(reputation,original index)
        #include myself
        myself=(current_reputation,len(playerList)+100)
        playerList.append(myself)
        playerList = sorted(playerList,reverse=True)
        currRankingValue = playerList.index(myself)

        
        #if i have the best reputation do not hunt with anyone
        hunt_decisions = ['s']*len(player_reputations)
        if currRankingValue == 0:
            self.prevRankingValue = currRankingValue
            return hunt_decisions;
        
        #for each player, only hunt with those who has better reputation than me
        
        for (rep,ind) in playerList:
            #if not myself
            if ind != len(playerList)+100:
                playerIndex=playerList.index((rep,ind))
                #print playerIndex
                try:
                    if playerIndex<currRankingValue:
                        mr,tmp = max(playerList)
                        mir,tmp = min(playerList)
                        if playerIndex == 0 or rep > 0.5 or rep>=((mr+current_reputation)/2): # except people who have too good a reputation
                            hunt_decisions[ind]='s'
                        else:
                            hunt_decisions[ind]='h'
                    else:
                        hunt_decisions[ind]='s'
                except:
                    pass
        self.prevRankingValue = currRankingValue
        return hunt_decisions;

    def hunt_outcomes(self, food_earnings):
        pass # do nothing

    def round_end(self, award, m, number_hunters):
        pass # do nothing

